#include <stdio.h>
#include <string.h>

#pragma pack(1)

struct st{
    short a1;
    short a2;
    short a3;
};

struct st2{
    long a1;
    short a2;
};

struct st3{
    int a1;
    char a2;
    short a3;
    long a4;
    char a5;
};

struct st4{
    char a1[3];
    int a2;
    struct st3 a4;
    long a3;
};

int main() {
    //struct st st_val;
    /*struct st2 st_val2;

    printf("sizeof(long) = %d\n", sizeof(long));
    printf("sizeof(struct st) = %d\n", sizeof(struct st));
    printf("sizeof(struct st2) = %d\n", sizeof(struct st2));
    printf("st_val2 addr = %p\n", &st_val2);
    printf("st_val2 a1 addr = %p\n", &st_val2.a1);
    printf("st_val2 a2 addr = %p\n", &st_val2.a2);*/

    struct st3 st_val3;
    printf("sizeof(struct st3) = %d\n", sizeof(struct st3));
    printf("st_val3 addr = %p\n", &st_val3);
    printf("st_val3.a1 addr = %p\n", &st_val3.a1);
    printf("st_val3.a2 addr = %p\n", &st_val3.a2);
    printf("st_val3.a3 addr = %p\n", &st_val3.a3);
    printf("st_val3.a4 addr = %p\n", &st_val3.a4);
    printf("st_val3.a5 addr = %p\n", &st_val3.a5);
    /*printf("sizeof(struct st4) = %d\n", sizeof(struct st4));*/

    /*
    struct st4 st_val4;
    printf("sizeof(struct st4) = %d\n", sizeof(struct st4));
    printf("st4 addr = %p\n", &st_val4);
    printf("st_val4.a1 addr = %p\n", &st_val4.a1);
    printf("st_val4.a2 addr = %p\n", &st_val4.a2);
    printf("st_val4.a3 addr = %p\n", &st_val4.a3);
    printf("st_val4.a4 addr = %p\n", &st_val4.a4);*/

    return 0;
}
